Program Tailoring: Slicing by Sequential Criteria
نویسندگان
چکیده
Protocol and typestate analyses often report some sequences of statements ending at a program point P that needs to be scrutinized, since P may be erroneous or imprecisely analyzed. Program slicing focuses only on the behavior at P by computing a slice of the program affecting the values at P . In this paper, we propose to restrict our attention to the subset of that behavior at P affected by one or several statement sequences, called a sequential criterion (SC). By leveraging the ordering information in a SC, e.g., the temporal order in a few valid/invalid API method invocation sequences, we introduce a new technique, program tailoring, to compute a tailored program that comprises the statements in all possible execution paths passing through at least one sequence in SC in the given order. With a prototyping implementation, Tailor, we show why tailoring is practically useful by conducting two case studies on seven large real-world Java applications. For program debugging and understanding, Tailor can complement program slicing by removing SC-irrelevant statements. For program analysis, Tailor can enable a pointer analysis, which is unscalable to a program, to perform a more focused and therefore potentially scalable analysis to its SC -relevant parts containing hard language features such as reflection. 1998 ACM Subject Classification F.3.2 Semantics of Programming Languages Program Analysis, D.2.5 Testing and Debugging Code inspections and Debugging aids
منابع مشابه
Program Tailoring: Slicing by Sequential Criteria (Artifact)
Protocol and typestate analyses often report some sequences of statements ending at a program point P that needs to be scrutinized, since P may be erroneous or imprecisely analyzed. Program slicing focuses only on the behavior at P by computing a slice of the program affecting the values at P . In our companion paper “Program Tailoring: Slicing by Sequential Criteria”, we propose to focus on th...
متن کاملThe next 700 slicing criteria
A slice is constructed by deleting statements from a program whilst preserving some projection of its semantics. Since Mark Weiser introduced program slicing in 1979, a wide variety of slicing paradigms have been proposed, each of which is based upon a new formulation of the slicing criterion, capturing the semantic projection to be preserved during the process of command deletion. This paper s...
متن کاملStatic Interprocedural Slicing of Shared Memory Parallel Programs
Software tools for program debugging, software testing, software maintenance, and program understanding have all effectively utilized static program slicing techniques. In this paper, we present an approach to extend this capability to explicitly parallel shared memory programs written using the OpenMP standard. In particular, interprocedural static program slicing of OpenMP programs is enabled...
متن کاملUsing Program Slicing Technique to Reduce the Cost of Software Testing
Systems of computers and their application in the lives of modern human beings are vastly expanding. In any kind of computer application, failure in computer systems can lead to a range of financial and mortal losses. Indeed, the major origin of software failure can be located in designing or implementing software. With regard to these statistics, 30% of the software projects have been prospero...
متن کاملDynamic Slicing of Concurrent Programs : Where are We and Where is the Right Way ? ( Extended
Program slicing has been developed as a standard technique used in various software engineering activit ies including program understanding, testing, debugging, maintenance, and complexity measurement. Although both static and dynamic slicing of sequential programs have been applied to software engineering practices, there still are some challenges, problems and issues in slicing concurrent pro...
متن کامل